import request from '@/utils/request'

// 获取角色
// obj: {page,  pagesize}
export const getRoles = function(obj) {
  return request.get('/sys/role', { params: obj })
}

export const delRole = function(id) {
  return request.delete('/sys/role/' + id)
}

// 添加角色
// data: { name, description }
export const addRoles = function(data) {
  return request.post('/sys/role', data)
}
